﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.PopulationTriggers {
    import Classes.*;
    import Classes.announcements.*;
    import Init.PostInit.PostInitActions.*;
    import com.zynga.skelly.util.*;

    public class AnnouncementTrigger implements IPopulationTrigger {

        protected var m_hasTriggered:Boolean = false;
        protected var m_announcementId:String;

        public function AnnouncementTrigger(_arg1:XML){
            this.m_announcementId = String(_arg1.@id);
        }
        public function trigger():void{
            var _local4:StartUpDialogHelper;
            this.m_hasTriggered = true;
            var _local1:AnnouncementData = Global.announcementManager.getAnnouncementById(this.m_announcementId);
            if (!_local1){
                return;
            };
            var _local2:Function;
            if (_local1.view.closeCallback){
                _local4 = new StartUpDialogHelper();
                _local2 = Curry.curry(_local4.getCallback(_local1.view.closeCallback.name), _local1.view.closeCallback.params);
            };
            var _local3:AnnouncementDialog = new AnnouncementDialog(_local1, _local2, false, true);
            _local3.show();
        }
        public function hasTriggered():Boolean{
            return (this.m_hasTriggered);
        }

    }
}//package Classes.PopulationTriggers 
